<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{sysApproveLevelBean.id}"/>
		<f:event type="preRenderView" listener="#{sysApproveLevelBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Sys Approve Level"/>

	<ui:define name="header">
		Sys Approve Level
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty sysApproveLevelBean.id}">
				Edit existing Sys Approve Level
			</c:when>
			<c:otherwise>
				Create a new Sys Approve Level
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="sysApproveLevelBeanSysApproveLevelSysUserRole" value="Sys User Role:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{sysUserRoleBean.converter}" id="sysApproveLevelBeanSysApproveLevelSysUserRole" value="#{sysApproveLevelBean.sysApproveLevel.sysUserRole}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysUserRoleBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="sysApproveLevelBeanSysApproveLevelSysUserRole" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysApproveLevelBeanSysApproveLevelApprovedLevelDescr" value="Approved Level Descr:"/>
				<h:panelGroup>
					<h:inputText id="sysApproveLevelBeanSysApproveLevelApprovedLevelDescr" maxLength="50" value="#{sysApproveLevelBean.sysApproveLevel.approvedLevelDescr}"/>
					<h:message for="sysApproveLevelBeanSysApproveLevelApprovedLevelDescr" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysApproveLevelBeanSysApproveLevelApprovedLevelVal" value="Approved Level Val:"/>
				<h:panelGroup>
					<h:inputText id="sysApproveLevelBeanSysApproveLevelApprovedLevelVal" value="#{sysApproveLevelBean.sysApproveLevel.approvedLevelVal}"/>
					<h:message for="sysApproveLevelBeanSysApproveLevelApprovedLevelVal" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysApproveLevelBeanSysApproveLevelSaleLoanContracts" value="Sale Loan Contracts:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysApproveLevelBean.sysApproveLevel.saleLoanContracts}"/>
					<h:dataTable id="sysApproveLevelBeanSysApproveLevelSaleLoanContracts" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Hr Emp"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemHrEmp" value="#{forgeview:display(_item.hrEmp)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{hrEmpBean.converter}" id="saleLoanContractBeanAddHrEmp" value="#{saleLoanContractBean.add.hrEmp}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddHrEmp" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Cust"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysCust" value="#{forgeview:display(_item.sysCust)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysCustBean.converter}" id="saleLoanContractBeanAddSysCust" value="#{saleLoanContractBean.add.sysCust}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCustBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysCust" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Vehicle Brand"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysVehicleBrand" value="#{forgeview:display(_item.sysVehicleBrand)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysVehicleBrandBean.converter}" id="saleLoanContractBeanAddSysVehicleBrand" value="#{saleLoanContractBean.add.sysVehicleBrand}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysVehicleBrandBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysVehicleBrand" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sale Loan Grade"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSaleLoanGrade" value="#{forgeview:display(_item.saleLoanGrade)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{saleLoanGradeBean.converter}" id="saleLoanContractBeanAddSaleLoanGrade" value="#{saleLoanContractBean.add.saleLoanGrade}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{saleLoanGradeBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSaleLoanGrade" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Org"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysOrg" value="#{forgeview:display(_item.sysOrg)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysOrgBean.converter}" id="saleLoanContractBeanAddSysOrg" value="#{saleLoanContractBean.add.sysOrg}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysOrgBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysOrg" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(saleLoanContractBean.added)}" id="sysApproveLevelBeanSysApproveLevelSaleLoanContractsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{saleLoanContractBean.add.sysApproveLevel}" value="#{sysApproveLevelBean.sysApproveLevel}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysApproveLevelBeanSysApproveLevelSysApproveLevelRateVehicleTypes" value="Sys Approve Level Rate Vehicle Types:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysApproveLevelBean.sysApproveLevel.sysApproveLevelRateVehicleTypes}"/>
					<h:dataTable id="sysApproveLevelBeanSysApproveLevelSysApproveLevelRateVehicleTypes" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Vehicle Type 01"/>
							</f:facet>
							<h:link outcome="/form/sysApproveLevelRateVehicleType/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="forgeviewdisplayitemSysVehicleType01" value="#{forgeview:display(_item.sysVehicleType01)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysVehicleType01Bean.converter}" id="sysApproveLevelRateVehicleTypeBeanAddSysVehicleType01" value="#{sysApproveLevelRateVehicleTypeBean.add.sysVehicleType01}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysVehicleType01Bean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysApproveLevelRateVehicleTypeBeanAddSysVehicleType01" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Approved Min Val"/>
							</f:facet>
							<h:link outcome="/form/sysApproveLevelRateVehicleType/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemApprovedMinVal" value="#{_item.approvedMinVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysApproveLevelRateVehicleTypeBeanAddApprovedMinVal" value="#{sysApproveLevelRateVehicleTypeBean.add.approvedMinVal}"/>
								<h:message for="sysApproveLevelRateVehicleTypeBeanAddApprovedMinVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Approved Max Val"/>
							</f:facet>
							<h:link outcome="/form/sysApproveLevelRateVehicleType/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemApprovedMaxVal" value="#{_item.approvedMaxVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysApproveLevelRateVehicleTypeBeanAddApprovedMaxVal" value="#{sysApproveLevelRateVehicleTypeBean.add.approvedMaxVal}"/>
								<h:message for="sysApproveLevelRateVehicleTypeBeanAddApprovedMaxVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysApproveLevelRateVehicleTypeBean.added)}" id="sysApproveLevelBeanSysApproveLevelSysApproveLevelRateVehicleTypesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysApproveLevelRateVehicleTypeBean.add.sysApproveLevel}" value="#{sysApproveLevelBean.sysApproveLevel}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="sysApproveLevelBeanSysApproveLevelSysApproveLevelRates" value="Sys Approve Level Rates:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{sysApproveLevelBean.sysApproveLevel.sysApproveLevelRates}"/>
					<h:dataTable id="sysApproveLevelBeanSysApproveLevelSysApproveLevelRates" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Approved Max Val"/>
							</f:facet>
							<h:link outcome="/form/sysApproveLevelRate/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemApprovedMaxVal" value="#{_item.approvedMaxVal}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysApproveLevelRateBeanAddApprovedMaxVal" value="#{sysApproveLevelRateBean.add.approvedMaxVal}"/>
								<h:message for="sysApproveLevelRateBeanAddApprovedMaxVal" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Approved Level Seq No"/>
							</f:facet>
							<h:link outcome="/form/sysApproveLevelRate/view">
								<f:param name="id" value="#{_item.id}"/>
								<h:outputText id="itemApprovedLevelSeqNo" value="#{_item.approvedLevelSeqNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysApproveLevelRateBeanAddApprovedLevelSeqNo" value="#{sysApproveLevelRateBean.add.approvedLevelSeqNo}"/>
								<h:message for="sysApproveLevelRateBeanAddApprovedLevelSeqNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysApproveLevelRateBean.added)}" id="sysApproveLevelBeanSysApproveLevelSysApproveLevelRatesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysApproveLevelRateBean.add.sysApproveLevel}" value="#{sysApproveLevelBean.sysApproveLevel}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{sysApproveLevelBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty sysApproveLevelBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{sysApproveLevelBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{sysApproveLevelBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>